package org.mayuanxiaonong.timserver.packet;

/**
 * 消息报文
 * 
 * @author 9527
 *
 */
public class MessagePacket extends Packet {

	private int from;
	private int to;
	private String msg;

	public MessagePacket(int type) {
		super(type);
	}

	public MessagePacket(int type, int from, int to, String msg) {
		super(type);
		this.from = from;
		this.to = to;
		this.msg = msg;
	}

	public int getFrom() {
		return from;
	}

	public void setFrom(int from) {
		this.from = from;
	}

	public int getTo() {
		return to;
	}

	public void setTo(int to) {
		this.to = to;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	@Override
	public String toString() {
		return "Message [from=" + from + ", to=" + to + ", msg=" + msg
				+ ", getType()=" + getType() + "]";
	}

}
